package com.sunny.ynhz.ui.daily.news;

import android.widget.ListView;

import com.sunny.ynhz.R;
import com.sunny.ynhz.adapter.WaterQualityinformAdapter;
import com.sunny.ynhz.bean.WaterInformBean;
import com.sunny.ynhz.ui.base.BaseFragment;

import java.util.ArrayList;

import butterknife.BindView;

/**
 * Created by Administrator on 2017/7/15/015.
 */

public class WaterQuaMsgFragment extends BaseFragment {
    ArrayList<WaterInformBean> waterInforms;
    @BindView(R.id.iv_water_inform)
    ListView myListView;
    private WaterInformBean waterInformBean1;
    public static WaterQuaMsgFragment getInstanceWaterQuaMsgFragment(){
        return new WaterQuaMsgFragment();
    }
    @Override
    protected int setLayoutResourceID() {
        return R.layout.fragment_water_index;
    }

    @Override
    protected void setUpView() {
        super.setUpView();
        initDate();
        myListView.setAdapter(new WaterQualityinformAdapter(getActivity(),waterInforms));
    }

    public void initDate() {
        waterInforms = new ArrayList<>();
        waterInformBean1 = new WaterInformBean();
        waterInformBean1.setArea("南沙区");
        waterInformBean1.setRange(5);
        waterInformBean1.setRiverName("金州涌");
        waterInformBean1.setRangWater("五类");
        waterInformBean1.setRangRiver("重要区河道");

        WaterInformBean waterInformBean3 = new WaterInformBean();
        waterInformBean3.setArea("花都区");
        waterInformBean3.setRange(3);
        waterInformBean3.setRangRiver("省级");
        waterInformBean3.setRiverName("流溪河从化段");
        waterInformBean3.setRangWater("三类");

        WaterInformBean waterInformBean4 = new WaterInformBean();
        waterInformBean4.setArea("白海区");
        waterInformBean4.setRange(4);
        waterInformBean4.setRangRiver("区级");
        waterInformBean4.setRiverName("永平街永泰村段");
        waterInformBean4.setRangWater("四类");

        WaterInformBean waterInformBean5 = new WaterInformBean();
        waterInformBean5.setArea("牛肚湾涌");
        waterInformBean5.setRange(1);
        waterInformBean5.setRangRiver("区级");
        waterInformBean5.setRiverName("左岸");
        waterInformBean5.setRangWater("三类");

        WaterInformBean waterInformBean6 = new WaterInformBean();
        waterInformBean6.setArea("地铁B涌");
        waterInformBean6.setRange(3);
        waterInformBean6.setRangRiver("区级");
        waterInformBean6.setRiverName("左岸");
        waterInformBean6.setRangWater("二类");

        WaterInformBean waterInformBean7= new WaterInformBean();
        waterInformBean7.setArea("秀水涌");
        waterInformBean7.setRange(5);
        waterInformBean7.setRangRiver("区级");
        waterInformBean7.setRiverName("");
        waterInformBean7.setRangWater("二类");

        WaterInformBean waterInformBean8= new WaterInformBean();
        waterInformBean8.setArea("河沙涌");
        waterInformBean8.setRange(5);
        waterInformBean8.setRangRiver("区级");
        waterInformBean8.setRiverName("");
        waterInformBean8.setRangWater("二类");


        WaterInformBean waterInformBean9= new WaterInformBean();
        waterInformBean9.setArea("西郊涌");
        waterInformBean9.setRange(5);
        waterInformBean9.setRangRiver("区级");
        waterInformBean9.setRiverName("");
        waterInformBean9.setRangWater("二类");

        waterInforms.add(waterInformBean1);
        waterInforms.add(waterInformBean3);
        waterInforms.add(waterInformBean4);
        waterInforms.add(waterInformBean5);
        waterInforms.add(waterInformBean6);
        waterInforms.add(waterInformBean7);
        waterInforms.add(waterInformBean8);
        waterInforms.add(waterInformBean9);

    }
}
